package com.eastedu.manager;


import com.eastedu.client.file.model.FileInfoResponse;
import com.eastedu.client.file.model.FileSignatureRequest;
import com.eastedu.client.file.model.FileSignatureResponse;
import com.eastedu.client.file.model.FileUpdateRequest;

import java.util.List;
import java.util.Set;

/**
 * The interface File manager.
 *
 * @author zhangzhishuai
 */
public interface FileManager {
    /**
     * Gets download url.
     *
     * @param fileId the file id
     * @return the download url
     */
    String getDownloadUrl(Long fileId);

    /**
     * Gets file info by md 5.
     *
     * @param md5 the md 5
     * @return the file info by md 5
     */
    FileInfoResponse getFileInfoByMd5(String md5);

    /**
     * Gets file info.
     *
     * @param fileId the file id
     * @return the file info
     */
    FileInfoResponse getFileInfo(Long fileId);

    /**
     * 文件归档
     *
     * @param fileIds the file ids
     * @return the boolean
     */
    boolean fileArchive(Set<String> fileIds);

    /**
     * Post file signature file signature response.
     *
     * @param fileSignatureRequest the file signature request
     * @return the file signature response
     */
    FileSignatureResponse postFileSignature(FileSignatureRequest fileSignatureRequest);

    /**
     * Put file.
     *
     * @param fileId            the file id
     * @param fileUpdateRequest the file update request
     */
    void putFile(String fileId, FileUpdateRequest fileUpdateRequest);


    /**
     * Restore.
     *
     * @param fileIds the file ids
     */
    void restore(List<String> fileIds);
}
